package com.ebs.md.fxmonitor.marketmonitor;

/**
 * Revision Author:
 *  $File: //depot/MarketData/fxmonitor/main/src/test/java/com/ebs/md/fxmonitor/marketmonitor/Tools.java $
 *  $Revision: #1 $
 *  $DateTime: 2012/05/09 13:01:51 $
 *  $Change: 110902 $
 *  $Author: Arik.Sher $
 */

import javax.jms.BytesMessage;
import javax.jms.JMSException;

public final class Tools {
	
	private Tools() {}

	public static byte[] extractBytes(BytesMessage bytesJmsMessage) throws JMSException {
		int bodyLength = (int)bytesJmsMessage.getBodyLength();
		byte[] messageBody = new byte[bodyLength];   
		
		bytesJmsMessage.readBytes(messageBody);
		
		return messageBody;
	}

}
